﻿using System;
using Interface;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace UnitTest{
    [TestClass]
    public class UnitTest{
        private class Test : Logika{
            public new List<string> filterSum(decimal min, decimal max, List<Tuple<Employee, decimal>> employees){
                return base.filterSum(min, max, employees);
            }
        }
        [TestMethod]
        public void testFilterSum(){
            var testData = new List<Tuple<Employee, decimal>>{
                Tuple.Create( new Employee(){ FirstName = "Sylwester", LastName = "Stalone" }, 15M),
                Tuple.Create( new Employee(){ FirstName = "Sean", LastName = "Stalone" }, 6M),
                Tuple.Create( new Employee(){ FirstName = "Val", LastName = "Kilmer" }, 78M),
                Tuple.Create( new Employee(){ FirstName = "John", LastName = "Voight" }, 1000M),
                Tuple.Create( new Employee(){ FirstName = "Arnold", LastName = "Schwarzenegger" }, 155M),
            };
            Assert.AreEqual(
                new Test().filterSum(10M, 160M, testData).Count,
                3,
                "The filterSum returned a different value");
        }
    }
}
